package com.sali.asyncollection.service.impl.strategy.method2;


import com.sali.asyncollection.service.impl.strategy.method1.thread.ScoreGetThread;
import com.sali.asyncollection.service.impl.strategy.method2.runable.SendMsgRunnable;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: sali
 * @date: 2024/7/21 下午3:13.
 * @version: 1.0
 */
@Component
public class AsynMethod02 {

    public void execute(Long userId) {
        SendMsgRunnable sendMsgRunnable = new SendMsgRunnable(userId);
        ScoreGetThread scoreGetThread = new ScoreGetThread(userId);
        new Thread(sendMsgRunnable).start();
        new Thread(scoreGetThread).start();
    }

}
